package com.yzkj.siot.service;

import com.yzkj.siot.domain.TenantDeviceData;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface TaskTreadService {

    /**
     * 使用线程池来插入设备数据到redis
     *
     * @param service  service
     * @param entities 期望插入的数据列表
     */
    @Async("taskExecutor")
    void deviceDataBatchSaveToCache(TenantDeviceDataService service, List<TenantDeviceData> entities);
}
